unit Calendario;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ComCtrls, DB, DBTables;

type
  TFormCalendario = class(TForm)
    MonthCalendar1: TMonthCalendar;
    BitBtn1: TBitBtn;
    QueryAux: TQuery;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormCalendario: TFormCalendario;
  sql: String;

implementation

uses Movimento, Principal;

{$R *.dfm}

procedure TFormCalendario.BitBtn1Click(Sender: TObject);
begin

FormMovimento.labelData.caption := 'Data Movimento: ' + FormPrincipal.FormataData(MonthCalendar1.date,4);
//FormPrincipal.vDataMovimento := FormPrincipal.FormataData(MonthCalendar1.date,4);
FormMovimento.vData := FormPrincipal.FormataData(MonthCalendar1.date,4);

self.close;
end;

procedure TFormCalendario.FormActivate(Sender: TObject);
begin

MonthCalendar1.date := now;

end;

end.
